README for Using the COpenGLView Class

What I've done here is to subclass the COpenGLView
class with class CMyView. This class is then used to
replace the refernce to the COpenGLView in the template
in the app initialization, which, in this case, takes
place in the COpenGLViewClassApp::InitInstance() function.
You can compare it with the previous example. In order for they
dynamic creation of our new view class to work, we have to include
the following line so that MFC knows how to create an instance
of a CMyView class-derived from a COpenGLView class.

IMPLEMENT_DYNCREATE(CMyView, COpenGLView)

Place this line in the inplementation file just after the include
file reference. You'll also have to include the following line:

DECLARE_DYNCREATE(CMyView)

for the same reason in the class definition.

We then replace the stock scene in COpenGLView with a new
one in CMyView via the C++ virtual function mechanism. The
objective is to place the COpenGLView class into some sharing
mechanism (for simplicity, we just share the code, but a lib
or DLL would also work).


